<%@ page language="java" isELIgnored="false" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<%@ include file="/WEB-INF/jsp/ResourceGlobal.jsp"%>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>新增产品创设需求</title>

<style type="text/css">
	.iCheck-helper{
	   position: absolute; 
	   top: 0%; 
	   left: 0%; 
	   display: block; 
	   width: 100%; 
	   height: 100%;
	   margin: 0px; 
	   padding: 0px;
	   background: rgb(255, 255, 255);
	   border: 0px; 
	   opacity: 0;
	}
</style>

<script type="text/javascript">
	var targetPath = '<%=context%>' + 'business/product/demand/';
	//默认加载
	$(function(){
		//把访问路径传到js
		setPathPrefix(targetPath);
	});
</script>
	
</head>
<body  class="sub-page">
<!-- 顶部导航栏 -->
  <jsp:include page="/WEB-INF/jsp/system/index/homeHead.jsp"></jsp:include>
	<div class="location">
	    <i class="fas fa-home"></i>
	    <p>您现在的位置：主页</p>
	    <p class="current">&gt;产品创设</p>
	    <p class="current">&gt;产品创设需求</p>
	    <p class="current">&gt;修改</p>
 	</div>

	<div class="container">
		<div class="page-content">
		    <form id="demandAddForm" name="demandAddForm" role="form" method="post" class="form-horizontal">
		    	<input class="hidden"  id="demandId" name="demandId" value="${demandVo.demandId }">
		    	
		    	<div class="model-content">
						<div class="form-group">
			            	<label class="col-sm-2 control-label" >需求标题<span class="text-danger">*</span></label>
				            <div class="col-sm-10 form-inner">
			 					<input class="form-control" placeholder="需求标题" id="title" name="title" value="${demandVo.title }">
							</div>
				        </div>
				 </div>
				 
				 <div class="model-content">
						<div class="form-group">
			            	<label class="col-sm-2 control-label" >处理人<span class="text-danger">*</span></label>
				            <div class="col-sm-10 form-inner">
				            	<select class="select2" name="managerId" id="managerId" placeholder="处理人" val="${demandVo.managerId }" text="${demandVo.companyName }"></select>
 							</div>
				        </div>
				 </div>
				 
				 <div class="form-group">
                 	<label class="col-sm-2 control-label">需求类型</label>
                    <div class="col-sm-10 form-inner">
                    	<div class="sub-sel-cont fl">
                    		<c:forEach var="dictDto" items="${dTypes}">
                    			<c:choose>
                    				<c:when test="${dictDto.dctValue eq  demandVo.type}">
                    					<label class="fl">
			                    			<div class="iradio_square-green dType checked" value="${dictDto.dctValue }" onclick="chooseDType(this);">
				                    			<ins class="iCheck-helper"></ins>
			                    			</div>${dictDto.dctName }
		                    			</label>
                    				</c:when>
                    				<c:otherwise>
                    					<label class="fl">
			                    			<div class="iradio_square-green dType" value="${dictDto.dctValue }" onclick="chooseDType(this);">
				                    			<ins class="iCheck-helper"></ins>
			                    			</div>${dictDto.dctName }
		                    			</label>
                    				</c:otherwise>
                    			</c:choose>
				            </c:forEach>
                        </div>
                        <input type="hidden" id="type" name="type"  value="${demandVo.type }">
                 	</div>
                 </div>
                 
                 <div class="model">
	      		 </div>
                 
		    	<div id="d-type" class="model">
	      			<div class="model-head">
	      				<span class="head-boder-left"></span>
	        			<h2 id="d-title">产品设计</h2>
	      			</div>
	      			<div class="model-content">
						<div class="form-group">
			            	<label class="col-sm-2 control-label">产品期限</label>
				            <div class="col-sm-10 form-inner">
			 					<input class="form-control" placeholder="产品期限" id="prdTerm" name="prdTerm" value="${demandVo.prdTerm }">
							</div>
				        </div>
				        <div class="form-group">
							<label class="col-sm-2 control-label">参考收益</label>
							<div class="col-sm-10 form-inner">
			 					<input class="form-control" placeholder="参考收益" id="refProfit" name="refProfit" value="${demandVo.refProfit }">
							</div>
							<!-- <div class="col-sm-10 form-inner">
								<textarea id="refProfit" name="refProfit" class="form-control"></textarea>
							</div> -->
						</div>
						<div class="form-group">
			            	<label class="col-sm-2 control-label">投资范围</label>
				            <div class="col-sm-10 form-inner">
			 					<textarea rows="8" class="form-control" id="investDesc" name="investDesc" >${demandVo.investDesc }</textarea>
							</div>
				        </div>
			            
					</div>
				</div>	
				
				
				<div id="m-type" class="model">
				
	      			<div class="model-head">
	      				<span class="head-boder-left"></span>
	        			<h2>材料拟定</h2>
	      			</div>
	      			
	      			
	      			<div class="form-group">
	                 	<label class="col-sm-2 control-label">材料类型</label>
	                    <div class="col-sm-10 form-inner">
	                    	<div class="sub-sel-cont fl">
	                    		<c:forEach var="dictDto" items="${mTypes}">
	                    			<c:choose>
	                    				<c:when test="${fn:contains(demandVo.materialType,dictDto.dctValue) }">
	                    					<label class="fl">
				                    			<div class="icheckbox_square-green mType checked" value="${dictDto.dctValue }" onclick="chooseMType(this);">
					                    			<ins class="iCheck-helper"></ins>
				                    			</div>${dictDto.dctName }
			                    			</label>
	                    				</c:when>
	                    				<c:otherwise>
	                    					<label class="fl">
				                    			<div class="icheckbox_square-green mType" value="${dictDto.dctValue }" onclick="chooseMType(this);">
					                    			<ins class="iCheck-helper"></ins>
				                    			</div>${dictDto.dctName }
			                    			</label>
	                    				</c:otherwise>
	                    			</c:choose>
	                    			
					            </c:forEach>
	                        </div>
						    <input type="hidden" id="materialType" name="materialType" value="${demandVo.materialType }">
	                 	</div>
	                 </div>
	      			
	      			
				</div>
				
				
				<div class="model">
	      			
	      			<div class="model-content">
						<div class="form-group">
			            	<label class="col-sm-2 control-label">备注</label>
				            <div class="col-sm-10 form-inner">
			 					<textarea rows="8" class="form-control" id="remark" name="remark" >${demandVo.remark }</textarea>
							</div>
				        </div>
					</div>
				</div>	
				
				
				<div class="model">
					<div class="model-head">
						<span class="head-boder-left"></span>
						<h2>附件</h2>
					</div>
					<div class="model-content clear">
						<jsp:include page="/WEB-INF/jsp/system/sys/attach/attachView.jsp">
							<jsp:param name="attachList" value="${attachList}"/>
							<jsp:param name="resourceId" value="${demandVo.demandId }"/>
							<jsp:param name="module" value="demandAddView" />
							<jsp:param name="hasPermission" value="true" />
							<jsp:param name="resourceSign" value="DEMAND_ADD"/>
							<jsp:param name="hidAttIdField"  value="{{attId}}"/>
						</jsp:include> 
					</div>
				</div>
			    <div class="page-footer" >
					<button type="button" id="submitBtn" class="btn btn-primary btn-save btn-loading btn-w-xs" data-loading-text="<i class='ico-loading'></i>" onclick="submitForm()">提交</button>
					<button type="button" id="cancelBtn" class="btn btn-link btn-w-xs" onclick="window.close();">取消</button>
				</div>
			</form>
		</div>
	</div>
		
		

<script type="text/javascript" src="<%=context%>resources/modules/business/demand/addDemand.js?r=<%=Math.random()%>"></script>	

</body>
</html>
